package com.yf.yfmovieapp.pojo;

import lombok.Data;

import java.util.List;

/**
 * @Author Yang_Vincent
 * @Date 2020/8/29 9:36
 */
@Data
public class R<T> {

    private Integer code;

    private Object msg;

    public static R ok(Object o){

        R r = new R<>();
        r.setCode(1);
        r.setMsg(o);
        return r;
    }

    public static R fail(Object o){

        R r = new R<>();
        r.setCode(0);
        r.setMsg(o);
        return r;
    }
}
